<?php
	if( isset($_POST['nombre'])){
		if( ($_POST['nombre'] != '') && ($_POST['email'] != '') && ($_POST['comentario']) != '') {
			
			$msgBody ='
    		<html>
	   		<head>
    				<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    				<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
    			</head>
    		
    			<body>    			
    				<p>
    					Nombre: <b>'. $_POST['nombre'] .'</b>
    			
    					<br /><br />
    					
    					E-mail: <b>'. $_POST['email'] .'</b>
    				
    					<br /><br />
    				
    					Comentario: 
    				
    					<br /><br />
    					
    					'. $_POST['comentario'] .'
    				</p>
    			</body>
    		</html>';   
    		
    		require_once('configMail.php');
    		
    		$mail->Subject    = "Contacto desde Delivery351";

    		$mail->MsgHTML($msgBody);
    		
    		$address = 'patricioa183@hotmail.com';
    		$mail->AddAddress($address);
    		
    		$mail->Send();
    	           	      
    		
    		$smarty->assign("error", 2);
		} else {
			$smarty->assign("error", 1);   
		}
	}
	
?>